package com.ht.aems.fesservice.handler;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Dong Shufeng
 *         Date: 2007-7-4
 *         Time: 15:58:05
 */
public class DL476I_NARI_Handler extends AbstractHandler {

    public void handle(byte[] data) {
        System.out.println("received:");
        for (byte b : data) {
            String sTemp = Integer.toHexString(b);
            int nTempLength = sTemp.length();
            if (nTempLength > 2)
                sTemp = sTemp.substring(nTempLength - 2, nTempLength);
            nTempLength = sTemp.length();
            if (nTempLength < 2)
                sTemp = "0" + sTemp;
            System.out.print(sTemp + "\t");
        }
        System.out.println();
        switch (data[0]) {
            case 1://request back
                System.out.println("connect request is received!");
                break;
            case 0x0F: //test code
                System.out.println("test data back is received!");
                break;
            case 0x0E:
                System.out.println("control data feedback is received");
                break;
            default:
                break;
        }
    }
}
